CREATE TABLE CRST_AP_PAY_HISTORY
(
  PAYMENT_HISTORY_ID           NUMBER(15),
  CHECK_ID                     NUMBER(15),
  ACCOUNTING_DATE              DATE,
  TRANSACTION_TYPE             VARCHAR2(30 BYTE),
  POSTED_FLAG                  VARCHAR2(1 BYTE),
  MATCHED_FLAG                 VARCHAR2(1 BYTE),
  ACCOUNTING_EVENT_ID          NUMBER(15),
  ORG_ID                       NUMBER(15),
  CREATION_DATE                DATE,
  CREATED_BY                   NUMBER(15),
  LAST_UPDATE_DATE             DATE,
  LAST_UPDATED_BY              NUMBER(15),
  LAST_UPDATE_LOGIN            NUMBER(15),
  PROGRAM_UPDATE_DATE          DATE,
  PROGRAM_APPLICATION_ID       NUMBER(15),
  PROGRAM_ID                   NUMBER(15),
  REQUEST_ID                   NUMBER(15),
  REV_PMT_HIST_ID              NUMBER(15),
  TRX_BANK_AMOUNT              NUMBER,
  ERRORS_BANK_AMOUNT           NUMBER,
  CHARGES_BANK_AMOUNT          NUMBER,
  TRX_PMT_AMOUNT               NUMBER,
  ERRORS_PMT_AMOUNT            NUMBER,
  CHARGES_PMT_AMOUNT           NUMBER,
  TRX_BASE_AMOUNT              NUMBER,
  ERRORS_BASE_AMOUNT           NUMBER,
  CHARGES_BASE_AMOUNT          NUMBER,
  BANK_CURRENCY_CODE           VARCHAR2(15 BYTE),
  BANK_TO_BASE_XRATE_TYPE      VARCHAR2(30 BYTE),
  BANK_TO_BASE_XRATE_DATE      DATE,
  BANK_TO_BASE_XRATE           NUMBER,
  PMT_CURRENCY_CODE            VARCHAR2(15 BYTE),
  PMT_TO_BASE_XRATE_TYPE       VARCHAR2(30 BYTE),
  PMT_TO_BASE_XRATE_DATE       DATE,
  PMT_TO_BASE_XRATE            NUMBER,
  MRC_PMT_TO_BASE_XRATE_TYPE   VARCHAR2(2000 BYTE),
  MRC_PMT_TO_BASE_XRATE_DATE   VARCHAR2(2000 BYTE),
  MRC_PMT_TO_BASE_XRATE        VARCHAR2(2000 BYTE),
  MRC_BANK_TO_BASE_XRATE_TYPE  VARCHAR2(2000 BYTE),
  MRC_BANK_TO_BASE_XRATE_DATE  VARCHAR2(2000 BYTE),
  MRC_BANK_TO_BASE_XRATE       VARCHAR2(2000 BYTE),
  MRC_TRX_BASE_AMOUNT          VARCHAR2(2000 BYTE),
  MRC_ERRORS_BASE_AMOUNT       VARCHAR2(2000 BYTE),
  MRC_CHARGES_BASE_AMOUNT      VARCHAR2(2000 BYTE),
  DUMMY                        CHAR(1),
  ORG_NAME                     VARCHAR2(240),
  CREATED_BY_NAME              VARCHAR2(100),
  LAST_UPDATED_BY_NAME         VARCHAR2(100)
);